package pruebaVisitor;

public class IVAVisitor implements Visitor {

	private double iva = 0;
	
	@Override
	public void visit(Libro libro) {
		iva += libro.getPrice()*.105;		
	}

	@Override
	public void visit(CD cd) {
		iva += cd.getPrice()*.21;
	}

	@Override
	public void visit(PSGame game) {
		iva += game.getPrice()*.21;
	}

	public double getIva() {
		return iva;
	}
}
